<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>订单管理</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="/Public/admin/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="/Public/admin/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <script src="/Public/admin/assets/js/echarts.min.js"></script>
    <link rel="stylesheet" href="/Public/admin/assets/css/amazeui.min.css" />
    <link rel="stylesheet" href="/Public/admin/assets/css/amazeui.datatables.min.css" />
    <link rel="stylesheet" href="/Public/admin/assets/css/app.css">
    <link href="/Public/person/css/orstyle.css" rel="stylesheet" type="text/css">
    <script src="/Public/admin/assets/js/jquery.min.js"></script>
    <style >
                img{width: 100%;}
    </style>
</head>

<body data-type="widgets">
    <script src="/Public/admin/assets/js/theme.js"></script>
    <div class="am-g tpl-g">
          <!-- 头部 -->
        <header>
            <!-- logo -->
            <div class="am-fl tpl-header-logo">
                <a href="javascript:;"><img src="/Public/admin/assets/img/logo.png" alt=""></a>
            </div>
            <!-- 右侧内容 -->
            <div class="tpl-header-fluid">
                <!-- 侧边切换 -->
                <div class="am-fl tpl-header-switch-button am-icon-list">
                    <span>

                </span>
                </div>
                <!-- 搜索 -->
                <div class="am-fl tpl-header-search">
                    <form class="tpl-header-search-form" action="javascript:;">
                        <button class="tpl-header-search-btn am-icon-search"></button>
                        <input class="tpl-header-search-box" type="text" placeholder="搜索内容...">
                    </form>
                </div>
                <!-- 其它功能-->
                <div class="am-fr tpl-header-navbar">
                    <ul>
                        <!-- 欢迎语 -->
                        <li class="am-text-sm tpl-header-navbar-welcome">
                            <a href="javascript:;">欢迎你, <span><?php echo (session('ADMINNAME')); ?></span> </a>
                        </li>

                        <!-- 新邮件 -->
                        <li class="am-dropdown tpl-dropdown" data-am-dropdown>
                            <a href="javascript:;" class="am-dropdown-toggle tpl-dropdown-toggle" data-am-dropdown-toggle>
                                <i class="am-icon-envelope"></i>
                                <span class="am-badge am-badge-success am-round item-feed-badge">4</span>
                            </a>
                            <!-- 弹出列表 -->
                            <ul class="am-dropdown-content tpl-dropdown-content">
                                <li class="tpl-dropdown-menu-messages">
                                    <a href="javascript:;" class="tpl-dropdown-menu-messages-item am-cf">
                                        <div class="menu-messages-ico">
                                            <img src="/Public/admin/assets/img/user04.png" alt="">
                                        </div>
                                        <div class="menu-messages-time">
                                            3小时前
                                        </div>
                                        <div class="menu-messages-content">
                                            <div class="menu-messages-content-title">
                                                <i class="am-icon-circle-o am-text-success"></i>
                                                <span>夕风色</span>
                                            </div>
                                            <div class="am-text-truncate"> Amaze UI 的诞生，依托于 GitHub 及其他技术社区上一些优秀的资源；Amaze UI 的成长，则离不开用户的支持。 </div>
                                            <div class="menu-messages-content-time">2016-09-21 下午 16:40</div>
                                        </div>
                                    </a>
                                </li>

                                <li class="tpl-dropdown-menu-messages">
                                    <a href="javascript:;" class="tpl-dropdown-menu-messages-item am-cf">
                                        <div class="menu-messages-ico">
                                            <img src="/Public/admin/assets/img/user02.png" alt="">
                                        </div>
                                        <div class="menu-messages-time">
                                            5天前
                                        </div>
                                        <div class="menu-messages-content">
                                            <div class="menu-messages-content-title">
                                                <i class="am-icon-circle-o am-text-warning"></i>
                                                <span>禁言小张</span>
                                            </div>
                                            <div class="am-text-truncate"> 为了能最准确的传达所描述的问题， 建议你在反馈时附上演示，方便我们理解。 </div>
                                            <div class="menu-messages-content-time">2016-09-16 上午 09:23</div>
                                        </div>
                                    </a>
                                </li>
                                <li class="tpl-dropdown-menu-messages">
                                    <a href="javascript:;" class="tpl-dropdown-menu-messages-item am-cf">
                                        <i class="am-icon-circle-o"></i> 进入列表…
                                    </a>
                                </li>
                            </ul>
                        </li>

                        <!-- 新提示 -->
                        <li class="am-dropdown" data-am-dropdown>
                            <a href="javascript:;" class="am-dropdown-toggle" data-am-dropdown-toggle>
                                <i class="am-icon-bell"></i>
                                <span class="am-badge am-badge-warning am-round item-feed-badge"><?php echo ($msgnumber); ?></span>
                            </a>

                            <!-- 弹出列表 -->
                            <ul class="am-dropdown-content tpl-dropdown-content">
                                <?php if(is_array($msglistdata)): $i = 0; $__LIST__ = $msglistdata;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li class="tpl-dropdown-menu-notifications">
                                    <a href="/Admin/Order/index" class="tpl-dropdown-menu-notifications-item am-cf">
                                        <div class="tpl-dropdown-menu-notifications-title">
                                            <i class="am-icon-line-chart"></i>
                                            <span> <?php echo ($vo["cnt"]); ?></span>
                                        </div>
                                        <div class="tpl-dropdown-menu-notifications-time">
                                            <?php echo ($vo["time"]); ?> 
                                        </div>
                                    </a>
                                </li><?php endforeach; endif; else: echo "" ;endif; ?>
                                
                                <!-- <li class="tpl-dropdown-menu-notifications">
                                    <a href="javascript:;" class="tpl-dropdown-menu-notifications-item am-cf">
                                        <div class="tpl-dropdown-menu-notifications-title">
                                            <i class="am-icon-star"></i>
                                            <span> 有3个来自人事部的消息</span>
                                        </div>
                                        <div class="tpl-dropdown-menu-notifications-time">
                                            30分钟前
                                        </div>
                                    </a>
                                </li>
                                <li class="tpl-dropdown-menu-notifications">
                                    <a href="javascript:;" class="tpl-dropdown-menu-notifications-item am-cf">
                                        <div class="tpl-dropdown-menu-notifications-title">
                                            <i class="am-icon-folder-o"></i>
                                            <span> 上午开会记录存档</span>
                                        </div>
                                        <div class="tpl-dropdown-menu-notifications-time">
                                            1天前
                                        </div>
                                    </a>
                                </li> -->


                                <li class="tpl-dropdown-menu-notifications">
                                    <a href="javascript:;" class="tpl-dropdown-menu-notifications-item am-cf">
                                        <i class="am-icon-bell"></i> 进入列表…
                                    </a>
                                </li>
                            </ul>
                        </li>

                        <!-- 退出 -->
                        <li class="am-text-sm">
                            <a href="/Admin/Index/adminLoginout">
                                <span class="am-icon-sign-out"></span> 退出
                            </a>
                        </li>
                    </ul>
                </div>
            </div>

        </header>
        <!-- 风格切换 -->
        <div class="tpl-skiner">
            <div class="tpl-skiner-toggle am-icon-cog">
            </div>
            <div class="tpl-skiner-content">
                <div class="tpl-skiner-content-title">
                    选择主题
                </div>
                <div class="tpl-skiner-content-bar">
                    <span class="skiner-color skiner-white" data-color="theme-white"></span>
                    <span class="skiner-color skiner-black" data-color="theme-black"></span>
                </div>
            </div>
        </div>
        <!-- 侧边导航栏 -->
        <div class="left-sidebar">
            <!-- 用户信息 -->
            <div class="tpl-sidebar-user-panel">
                <div class="tpl-user-panel-slide-toggleable">
                    <div class="tpl-user-panel-profile-picture">
                        <?php if(($_SESSION['ADMINIMG']) == ""): ?><img src="/Public/admin/assets/img/user04.png" alt="">
                        <?php else: ?>
                        <img src="<?php echo (session('ADMINIMG')); ?>" alt=""><?php endif; ?>
                        
                    </div>
                    <span class="user-panel-logged-in-text">
              <i class="am-icon-circle-o am-text-success tpl-user-panel-status-icon"></i>
              <!-- 禁言小张 -->
              <?php echo (session('ADMINNAME')); ?>
          </span>
                    <a href="javascript:;" class="tpl-user-panel-action-link"> <span class="am-icon-pencil"></span> 账号设置</a>
                </div>
            </div>

            <!-- 菜单 -->
            <ul class="sidebar-nav">
                <li class="sidebar-nav-heading">Components <span class="sidebar-nav-heading-info"> 附加组件</span></li>
                <li class="sidebar-nav-link">
                    <a href="/Admin/Index/index.html" class="active">
                        <i class="am-icon-home sidebar-nav-link-logo"></i> 首页
                    </a>
                </li>
                 <li class="sidebar-nav-link">
                    <a href="/Admin/Admincenter/index.html" >
                        <i class="am-icon-cog sidebar-nav-link-logo" ></i> 个人中心
                    </a>
                </li>

                 <li class="sidebar-nav-link">
                    <a href="/Admin/User/index.html">
                        <i class="am-icon-table sidebar-nav-link-logo"></i> 商城用户管理
                    </a>
                </li>

                <li class="sidebar-nav-link">
                    <a href="javascript:;" class="sidebar-nav-sub-title">
                        <i class="am-icon-gift sidebar-nav-link-logo"></i> 商品分类管理
                        <span class="am-icon-chevron-down am-fr am-margin-right-sm sidebar-nav-sub-ico"></span>
                    </a>
                    <ul class="sidebar-nav sidebar-nav-sub">
                        <li class="sidebar-nav-link">
                            <a href="/Admin/Sort/managesort.html">
                                <span class="am-icon-angle-right sidebar-nav-link-logo"></span> 商品一级分类列表
                            </a>
                        </li>

                        <li class="sidebar-nav-link">
                            <a href="/Admin/TwoSort/managetwosort.html">
                                <span class="am-icon-angle-right sidebar-nav-link-logo"></span> 商品二级分类列表
                            </a>
                        </li>
                    </ul>
                </li>

                <li class="sidebar-nav-link">
                    <a href="/Admin/Goods/managegoods.html">
                        <i class="am-icon-cart-arrow-down sidebar-nav-link-logo"></i> 商品管理
                    </a>
                </li>

                <li class="sidebar-nav-link">
                    <a href="/Admin/Order/index">
                        <i class="am-icon-table sidebar-nav-link-logo"></i> 订单管理
                    </a>
                </li>
                <li class="sidebar-nav-link">
                    <a href="/Admin/Index/tables.html">
                        <i class="am-icon-table sidebar-nav-link-logo"></i> 表格
                    </a>
                </li>
                <li class="sidebar-nav-link">
                    <a href="/Admin/Index/calendar.html">
                        <i class="am-icon-calendar sidebar-nav-link-logo"></i> 日历
                    </a>
                </li>
                <li class="sidebar-nav-link">
                    <a href="/Admin/Index/form.html">
                        <i class="am-icon-wpforms sidebar-nav-link-logo"></i> 表单

                    </a>
                </li>
                <li class="sidebar-nav-link">
                    <a href="/Admin/Index/chart.html">
                        <i class="am-icon-bar-chart sidebar-nav-link-logo"></i> 图表

                    </a>
                </li>

           <!--      <li class="sidebar-nav-heading">Page<span class="sidebar-nav-heading-info"> 常用页面</span></li>
                <li class="sidebar-nav-link">
                    <a href="javascript:;" class="sidebar-nav-sub-title">
                        <i class="am-icon-table sidebar-nav-link-logo"></i> 数据列表
                        <span class="am-icon-chevron-down am-fr am-margin-right-sm sidebar-nav-sub-ico"></span>
                    </a>
                    <ul class="sidebar-nav sidebar-nav-sub">
                        <li class="sidebar-nav-link">
                            <a href="/Admin/Index/table-list.html">
                                <span class="am-icon-angle-right sidebar-nav-link-logo"></span> 文字列表
                            </a>
                        </li>

                        <li class="sidebar-nav-link">
                            <a href="/Admin/Index/table-list-img.html">
                                <span class="am-icon-angle-right sidebar-nav-link-logo"></span> 图文列表
                            </a>
                        </li>
                    </ul>
                </li> -->
              
               
              

            </ul>
        </div>

         

        <!-- 内容区域 -->
        <div class="tpl-content-wrapper">

            <div class="container-fluid am-cf">
                <div class="row">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-9">
                        <div class="page-header-heading"><span class="am-icon-home page-header-heading-icon"></span>订单管理 <small></small></div>
                        <p class="page-header-description">可以查看、管理订单</p>
                    </div>
                    <div class="am-u-lg-3 tpl-index-settings-button">
                        
                    </div>
                </div>

            </div>

            <div class="row-content am-cf">

                <div class="row">
                        <div class="am-tabs am-tabs-d2 am-margin" data-am-tabs>

                            <ul class="am-avg-sm-5 am-tabs-nav am-nav am-nav-tabs">
                                <li class="am-active"><a href="#tab1">所有订单</a></li>
                              
                                <li><a href="#tab3">待发货</a></li>
                                <li><a href="#tab4">待收货</a></li>
                                <li><a href="#tab5">已完成</a></li>
                                <li><a href="#tab6">被删除</a></li>
                            </ul>

                            <div class="am-tabs-bd">
                                        <!-- 所有订单 -->
                                        <div class="am-tab-panel am-fade am-in am-active" id="tab1">
                                                    <div class="order-top">
                                                                 <div class="th th-item">
                                                                            <td class="td-inner">商品</td>
                                                                 </div>
                                                                 <div class="th th-price">
                                                                            <td class="td-inner">单价</td>
                                                                 </div>
                                                                 <div class="th th-number">
                                                                            <td class="td-inner">数量</td>
                                                                 </div>
                                                                 <div class="th th-operation">
                                                                            <td class="td-inner">商品操作</td>
                                                                  </div>
                                                                 <div class="th th-amount">
                                                                            <td class="td-inner">合计</td>
                                                                  </div>
                                                                 <div class="th th-status">
                                                                            <td class="td-inner">交易状态</td>
                                                                 </div>
                                                                 <div class="th th-change">
                                                                             <td class="td-inner">交易操作</td>
                                                                 </div>
                                                    </div>

                                                    <div class="order-main">
                                                                 <div class="order-list" >
                                                                              <?php if(is_array($orderdatalist)): $i = 0; $__LIST__ = $orderdatalist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><div class="order-status5">
                                                                                                        <div class="order-title">
                                                                                                                     <div class="dd-num">订单编号：<a href="javascript:;"><?php echo ($vo["id"]); ?></a></div>
                                                                                                                     <div class="dd-num">买家昵称：<a href="javascript:;"><?php echo ($vo["username"]); ?></a></div>
                                                                                                                     <span>成交时间：<?php echo (date('Y年m月d日 H:i:s' ,$vo["createtime"])); ?></span>
                                                                                                        </div>
                                                                                                        <div class="order-content">
                                                                                                                     <div class="order-left">
                                                                                                                                  <?php if(is_array($vo["goodslist"])): $i = 0; $__LIST__ = $vo["goodslist"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><ul class="item-list">
                                                                                                                                                <li class="td td-item">
                                                                                                                                                            <div class="item-pic">
                                                                                                                                                                         <a href="#" class="J_MakePoint">
                                                                                                                                                                                     <img src="<?php echo ($v["goodsimg"]["0"]); ?>" class="itempic J_ItemImg">
                                                                                                                                                                         </a>
                                                                                                                                                            </div>
                                                                                                                                                            <div class="item-info">
                                                                                                                                                                         <div class="item-basic-info">
                                                                                                                                                                                      <a href="#">
                                                                                                                                                                                                    <p><?php echo ($v["goodsname"]); ?></p>
                                                                                                                                                                                                    
                                                                                                                                                                                      </a>
                                                                                                                                                                         </div>
                                                                                                                                                            </div>
                                                                                                                                                </li>
                                                                                                                                                <li class="td td-price">
                                                                                                                                                            <div class="item-price">￥<?php echo ($v["goodsnow"]); ?></div>
                                                                                                                                                </li>
                                                                                                                                                <li class="td td-number">
                                                                                                                                                            <div class="item-number">
                                                                                                                                                                        <span>×</span><?php echo ($v["number"]); ?>
                                                                                                                                                            </div>
                                                                                                                                                </li>
                                                                                                                                                <li class="td td-operation">
                                                                                                                                                            <div class="item-operation">
                                                                                                                                                                        <?php switch($vo["status"]): case "0": ?><a href="refund.html">退款</a><?php break; endswitch;?>
                                                                                                                                                             </div>
                                                                                                                                                </li>
                                                                                                                                  </ul><?php endforeach; endif; else: echo "" ;endif; ?>


                                                                                                                     </div>
                                                                                                                     <div class="order-right">
                                                                                                                                  <li class="td td-amount">
                                                                                                                                                <div class="item-amount">
                                                                                                                                                    合计：￥<?php echo ($vo["payprices"]); ?>
                                                                                                                                                    <p>含运费：<span>0.00</span></p>
                                                                                                                                                </div>
                                                                                                                                   </li>
                                                                                                                                  <div class="move-right">
                                                                                                                                                <li class="td td-status">
                                                                                                                                                            <?php switch($vo["status"]): case "0": ?><div class="item-status">
                                                                                                                                                                                    <p class="Mystatus">买家已付款</p>
                                                                                                                                                                                    <p class="order-info">等待发货</p>
                                                                                                                                                                         </div><?php break;?>
                                                                                                                                                            <?php case "1": ?><div class="item-status">
                                                                                                                                                                                    <p class="Mystatus">卖家已发货</p>
                                                                                                                                                                                    <p class="order-info">等待收货</p>
                                                                                                                                                                          </div><?php break;?>
                                                                                                                                                            <?php case "2": ?><div class="item-status">
                                                                                                                                                                                    <p class="Mystatus">买家已收货</p>
                                                                                                                                                                                    <p class="order-info">购物完成</p>
                                                                                                                                                                         </div><?php break;?>
                                                                                                                                                             <?php case "3": ?><div class="item-status">
                                                                                                                                                                                    <p class="Mystatus">购物完成</p>
                                                                                                                                                                                    <p class="order-info">订单被删除</p>
                                                                                                                                                                         </div><?php break; endswitch;?>
                                                                                                                                                              
                                                                                                                                                </li>
                                                                                                                                                <li class="td td-change">
                                                                                                                                                            <?php switch($vo["status"]): case "0": ?><div class="am-btn am-btn-danger anniu" onclick="shipment('<?php echo ($vo["id"]); ?>');">商品发货</div><?php break;?>
                                                                                                                                                            <?php case "1": ?><div class="am-btn am-btn-danger anniu">提醒收货</div><?php break;?>
                                                                                                                                                            <?php case "2": ?><div class="am-btn am-btn-danger anniu" onclick="comment('<?php echo ($vo["id"]); ?>');">提醒评价</div><?php break;?>
                                                                                                                                                            <?php case "3": ?><div class="am-btn am-btn-danger anniu" onclick="recovery('<?php echo ($vo["id"]); ?>');">恢复订单</div><?php break; endswitch;?>
                                                                                                                                                </li>
                                                                                                                                   </div>
                                                                                                                     </div>
                                                                                                        </div>
                                                                                            </div><?php endforeach; endif; else: echo "" ;endif; ?>
                                                                              <!-- 分页链接 -->
                                                                              <div class="am-fr">
                                                                                            <?php echo ($show); ?>
                                                                              </div>

                                                                </div>

                                                    </div>

                                        </div>
                                        <!-- 待发货的订单 -->
                                        <div class="am-tab-panel am-fade" id="tab3">
                                                    <div class="order-top">
                                                                  <div class="th th-item">
                                                                        <td class="td-inner">商品</td>
                                                                  </div>
                                                                  <div class="th th-price">
                                                                        <td class="td-inner">单价</td>
                                                                  </div>
                                                                  <div class="th th-number">
                                                                        <td class="td-inner">数量</td>
                                                                  </div>
                                                                  <div class="th th-operation">
                                                                        <td class="td-inner">商品操作</td>
                                                                  </div>
                                                                  <div class="th th-amount">
                                                                        <td class="td-inner">合计</td>
                                                                 </div>
                                                                 <div class="th th-status">
                                                                        <td class="td-inner">交易状态</td>
                                                                 </div>
                                                                 <div class="th th-change">
                                                                        <td class="td-inner">交易操作</td>
                                                                 </div>
                                                    </div>

                                                    <div class="order-main">
                                                                <div class="order-list">
                                                                             <?php if(is_array($orderlist)): $i = 0; $__LIST__ = $orderlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if(($vo["status"]) == "0"): ?><div class="order-status5">
                                                                                                        <div class="order-title">
                                                                                                                     <div class="dd-num">订单编号：<a href="javascript:;"><?php echo ($vo["id"]); ?></a></div>
                                                                                                                     <div class="dd-num">买家昵称：<a href="javascript:;"><?php echo ($vo["username"]); ?></a></div>
                                                                                                                     <span>成交时间：<?php echo (date('Y年m月d日 H:i:s' ,$vo["createtime"])); ?></span>
                                                                                                        </div>
                                                                                                        <div class="order-content">
                                                                                                                     <div class="order-left">
                                                                                                                                  <?php if(is_array($vo["goodslist"])): $i = 0; $__LIST__ = $vo["goodslist"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><ul class="item-list">
                                                                                                                                                <li class="td td-item">
                                                                                                                                                            <div class="item-pic">
                                                                                                                                                                         <a href="#" class="J_MakePoint">
                                                                                                                                                                                     <img src="<?php echo ($v["goodsimg"]["0"]); ?>" class="itempic J_ItemImg">
                                                                                                                                                                         </a>
                                                                                                                                                            </div>
                                                                                                                                                            <div class="item-info">
                                                                                                                                                                         <div class="item-basic-info">
                                                                                                                                                                                      <a href="#">
                                                                                                                                                                                                    <p><?php echo ($v["goodsname"]); ?></p>
                                                                                                                                                                                                    
                                                                                                                                                                                      </a>
                                                                                                                                                                         </div>
                                                                                                                                                            </div>
                                                                                                                                                </li>
                                                                                                                                                <li class="td td-price">
                                                                                                                                                            <div class="item-price">￥<?php echo ($v["goodsnow"]); ?></div>
                                                                                                                                                </li>
                                                                                                                                                <li class="td td-number">
                                                                                                                                                            <div class="item-number">
                                                                                                                                                                        <span>×</span><?php echo ($v["number"]); ?>
                                                                                                                                                            </div>
                                                                                                                                                </li>
                                                                                                                                                <li class="td td-operation">
                                                                                                                                                            <div class="item-operation">
                                                                                                                                                                         <a href="refund.html">退款</a>
                                                                                                                                                             </div>
                                                                                                                                                </li>
                                                                                                                                  </ul><?php endforeach; endif; else: echo "" ;endif; ?>


                                                                                                                     </div>
                                                                                                                     <div class="order-right">
                                                                                                                                  <li class="td td-amount">
                                                                                                                                                <div class="item-amount">
                                                                                                                                                    合计：￥<?php echo ($vo["payprices"]); ?>
                                                                                                                                                    <p>含运费：<span>0.00</span></p>
                                                                                                                                                </div>
                                                                                                                                   </li>
                                                                                                                                  <div class="move-right">
                                                                                                                                                <li class="td td-status">
                                                                                                                                                             <div class="item-status">
                                                                                                                                                                        <p class="Mystatus">买家已付款</p>
                                                                                                                                                                        <p class="order-info">等待发货</p>
                                                                                                                                                             </div>
                                                                                                                                                </li>
                                                                                                                                                <li class="td td-change">
                                                                                                                                                            <div class="am-btn am-btn-danger anniu" onclick="shipment('<?php echo ($vo["id"]); ?>');">商品发货</div>
                                                                                                                                                </li>
                                                                                                                                   </div>
                                                                                                                     </div>
                                                                                                        </div>
                                                                                            </div>
                                                                                           <?php else: endif; endforeach; endif; else: echo "" ;endif; ?>
                                                                              <!-- 分页链接 -->
                                                                              <div class="am-fr">
                                                                                           
                                                                              </div>
                                                                </div>
                                                    </div>
                                        </div>
                                        <div class="am-tab-panel am-fade" id="tab4">
                                                    <div class="order-top">
                                                                 <div class="th th-item">
                                                                        <td class="td-inner">商品</td>
                                                                  </div>
                                                                  <div class="th th-price">
                                                                        <td class="td-inner">单价</td>
                                                                  </div>
                                                                  <div class="th th-number">
                                                                        <td class="td-inner">数量</td>
                                                                  </div>
                                                                  <div class="th th-operation">
                                                                        <td class="td-inner">商品操作</td>
                                                                  </div>
                                                                  <div class="th th-amount">
                                                                        <td class="td-inner">合计</td>
                                                                 </div>
                                                                 <div class="th th-status">
                                                                        <td class="td-inner">交易状态</td>
                                                                 </div>
                                                                 <div class="th th-change">
                                                                        <td class="td-inner">交易操作</td>
                                                                 </div>
                                                    </div>

                                                    <div class="order-main">
                                                                 <div class="order-list">
                                                                              <?php if(is_array($orderlist)): $i = 0; $__LIST__ = $orderlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if(($vo["status"]) == "1"): ?><div class="order-status5">
                                                                                                        <div class="order-title">
                                                                                                                     <div class="dd-num">订单编号：<a href="javascript:;"><?php echo ($vo["id"]); ?></a></div>
                                                                                                                     <div class="dd-num">买家昵称：<a href="javascript:;"><?php echo ($vo["username"]); ?></a></div>
                                                                                                                     <span>成交时间：<?php echo (date('Y年m月d日 H:i:s' ,$vo["createtime"])); ?></span>
                                                                                                        </div>
                                                                                                        <div class="order-content">
                                                                                                                     <div class="order-left">
                                                                                                                                  <?php if(is_array($vo["goodslist"])): $i = 0; $__LIST__ = $vo["goodslist"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><ul class="item-list">
                                                                                                                                                <li class="td td-item">
                                                                                                                                                            <div class="item-pic">
                                                                                                                                                                         <a href="#" class="J_MakePoint">
                                                                                                                                                                                     <img src="<?php echo ($v["goodsimg"]["0"]); ?>" class="itempic J_ItemImg">
                                                                                                                                                                         </a>
                                                                                                                                                            </div>
                                                                                                                                                            <div class="item-info">
                                                                                                                                                                         <div class="item-basic-info">
                                                                                                                                                                                      <a href="#">
                                                                                                                                                                                                    <p><?php echo ($v["goodsname"]); ?></p>
                                                                                                                                                                                                    
                                                                                                                                                                                      </a>
                                                                                                                                                                         </div>
                                                                                                                                                            </div>
                                                                                                                                                </li>
                                                                                                                                                <li class="td td-price">
                                                                                                                                                            <div class="item-price">￥<?php echo ($v["goodsnow"]); ?></div>
                                                                                                                                                </li>
                                                                                                                                                <li class="td td-number">
                                                                                                                                                            <div class="item-number">
                                                                                                                                                                        <span>×</span><?php echo ($v["number"]); ?>
                                                                                                                                                            </div>
                                                                                                                                                </li>
                                                                                                                                                <li class="td td-operation">
                                                                                                                                                            <div class="item-operation">
                                                                                                                                                                         <a href="refund.html">退款</a>
                                                                                                                                                             </div>
                                                                                                                                                </li>
                                                                                                                                  </ul><?php endforeach; endif; else: echo "" ;endif; ?>


                                                                                                                     </div>
                                                                                                                     <div class="order-right">
                                                                                                                                  <li class="td td-amount">
                                                                                                                                                <div class="item-amount">
                                                                                                                                                    合计：￥<?php echo ($vo["payprices"]); ?>
                                                                                                                                                    <p>含运费：<span>0.00</span></p>
                                                                                                                                                </div>
                                                                                                                                   </li>
                                                                                                                                  <div class="move-right">
                                                                                                                                                <li class="td td-status">
                                                                                                                                                            <div class="item-status">
                                                                                                                                                                        <p class="Mystatus">卖家已发货</p>
                                                                                                                                                                        <p class="order-info">等待收货</p>
                                                                                                                                                            </div>
                                                                                                                                                </li>
                                                                                                                                                <li class="td td-change">
                                                                                                                                                            <div class="am-btn am-btn-danger anniu" >提醒收货</div>
                                                                                                                                                </li>
                                                                                                                                   </div>
                                                                                                                     </div>
                                                                                                        </div>
                                                                                            </div>
                                                                                           <?php else: endif; endforeach; endif; else: echo "" ;endif; ?>
                                                                              <!-- 分页链接 -->
                                                                              <div class="am-fr">
                                                                                          
                                                                              </div>
                                                                </div>
                                                    </div>
                                        </div>

                                        <div class="am-tab-panel am-fade" id="tab5">
                                                    <div class="order-top">
                                                                 <div class="th th-item">
                                                                        <td class="td-inner">商品</td>
                                                                 </div>
                                                                 <div class="th th-price">
                                                                        <td class="td-inner">单价</td>
                                                                  </div>
                                                                  <div class="th th-number">
                                                                        <td class="td-inner">数量</td>
                                                                  </div>
                                                                  <div class="th th-operation">
                                                                        <td class="td-inner">商品操作</td>
                                                                  </div>
                                                                  <div class="th th-amount">
                                                                        <td class="td-inner">合计</td>
                                                                  </div>
                                                                  <div class="th th-status">
                                                                        <td class="td-inner">交易状态</td>
                                                                  </div>
                                                                  <div class="th th-change">
                                                                        <td class="td-inner">交易操作</td>
                                                                 </div>
                                                    </div>

                                        <div class="order-main">
                                                    <div class="order-list">
                                                        <!--不同状态的订单 -->
                                                                 <?php if(is_array($orderlist)): $i = 0; $__LIST__ = $orderlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if(($vo["status"]) == "2"): ?><div class="order-status5">
                                                                                            <div class="order-title">
                                                                                                         <div class="dd-num">订单编号：<a href="javascript:;"><?php echo ($vo["id"]); ?></a></div>
                                                                                                         <div class="dd-num">买家昵称：<a href="javascript:;"><?php echo ($vo["username"]); ?></a></div>
                                                                                                         <span>成交时间：<?php echo (date('Y年m月d日 H:i:s' ,$vo["createtime"])); ?></span>
                                                                                            </div>
                                                                                            <div class="order-content">
                                                                                                         <div class="order-left">
                                                                                                                      <?php if(is_array($vo["goodslist"])): $i = 0; $__LIST__ = $vo["goodslist"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><ul class="item-list">
                                                                                                                                    <li class="td td-item">
                                                                                                                                                <div class="item-pic">
                                                                                                                                                             <a href="#" class="J_MakePoint">
                                                                                                                                                                         <img src="<?php echo ($v["goodsimg"]["0"]); ?>" class="itempic J_ItemImg">
                                                                                                                                                             </a>
                                                                                                                                                </div>
                                                                                                                                                <div class="item-info">
                                                                                                                                                             <div class="item-basic-info">
                                                                                                                                                                          <a href="#">
                                                                                                                                                                                        <p><?php echo ($v["goodsname"]); ?></p>
                                                                                                                                                                                        
                                                                                                                                                                          </a>
                                                                                                                                                             </div>
                                                                                                                                                </div>
                                                                                                                                    </li>
                                                                                                                                    <li class="td td-price">
                                                                                                                                                <div class="item-price">￥<?php echo ($v["goodsnow"]); ?></div>
                                                                                                                                    </li>
                                                                                                                                    <li class="td td-number">
                                                                                                                                                <div class="item-number">
                                                                                                                                                            <span>×</span><?php echo ($v["number"]); ?>
                                                                                                                                                </div>
                                                                                                                                    </li>
                                                                                                                                    <li class="td td-operation">
                                                                                                                                                <div class="item-operation">
                                                                                                                                                             <a href="refund.html">退款</a>
                                                                                                                                                 </div>
                                                                                                                                    </li>
                                                                                                                      </ul><?php endforeach; endif; else: echo "" ;endif; ?>


                                                                                                         </div>
                                                                                                         <div class="order-right">
                                                                                                                      <li class="td td-amount">
                                                                                                                                    <div class="item-amount">
                                                                                                                                        合计：￥<?php echo ($vo["payprices"]); ?>
                                                                                                                                        <p>含运费：<span>0.00</span></p>
                                                                                                                                    </div>
                                                                                                                       </li>
                                                                                                                      <div class="move-right">
                                                                                                                                    <li class="td td-status">
                                                                                                                                                <div class="item-status">
                                                                                                                                                             <p class="Mystatus">买家已收货</p>
                                                                                                                                                             <p class="order-info">购物完成</p>
                                                                                                                                                </div>
                                                                                                                                    </li>
                                                                                                                                    <li class="td td-change">
                                                                                                                                                <div class="am-btn am-btn-danger anniu" onclick="comment('<?php echo ($vo["id"]); ?>');">提醒评价</div>
                                                                                                                                    </li>
                                                                                                                       </div>
                                                                                                         </div>
                                                                                            </div>
                                                                               </div>
                                                                               <?php else: endif; endforeach; endif; else: echo "" ;endif; ?>
                                                                  <!-- 分页链接 -->
                                                                 <div class="am-fr">
                                                                              
                                                                  </div>
                                                        
                                                    </div>

                                        </div>

                                </div>

                                       <div class="am-tab-panel am-fade" id="tab6">
                                                    <div class="order-top">
                                                                 <div class="th th-item">
                                                                        <td class="td-inner">商品</td>
                                                                 </div>
                                                                 <div class="th th-price">
                                                                        <td class="td-inner">单价</td>
                                                                  </div>
                                                                  <div class="th th-number">
                                                                        <td class="td-inner">数量</td>
                                                                  </div>
                                                                  <div class="th th-operation">
                                                                        <td class="td-inner">商品操作</td>
                                                                  </div>
                                                                  <div class="th th-amount">
                                                                        <td class="td-inner">合计</td>
                                                                  </div>
                                                                  <div class="th th-status">
                                                                        <td class="td-inner">交易状态</td>
                                                                  </div>
                                                                  <div class="th th-change">
                                                                        <td class="td-inner">交易操作</td>
                                                                 </div>
                                                    </div>

                                        <div class="order-main">
                                                    <div class="order-list">
                                                        <!--不同状态的订单 -->
                                                                 <?php if(is_array($orderlist)): $i = 0; $__LIST__ = $orderlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if(($vo["status"]) == "3"): ?><div class="order-status5">
                                                                                            <div class="order-title">
                                                                                                         <div class="dd-num">订单编号：<a href="javascript:;"><?php echo ($vo["id"]); ?></a></div>
                                                                                                         <div class="dd-num">买家昵称：<a href="javascript:;"><?php echo ($vo["username"]); ?></a></div>
                                                                                                         <span>成交时间：<?php echo (date('Y年m月d日 H:i:s' ,$vo["createtime"])); ?></span>
                                                                                            </div>
                                                                                            <div class="order-content">
                                                                                                         <div class="order-left">
                                                                                                                      <?php if(is_array($vo["goodslist"])): $i = 0; $__LIST__ = $vo["goodslist"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><ul class="item-list">
                                                                                                                                    <li class="td td-item">
                                                                                                                                                <div class="item-pic">
                                                                                                                                                             <a href="#" class="J_MakePoint">
                                                                                                                                                                         <img src="<?php echo ($v["goodsimg"]["0"]); ?>" class="itempic J_ItemImg">
                                                                                                                                                             </a>
                                                                                                                                                </div>
                                                                                                                                                <div class="item-info">
                                                                                                                                                             <div class="item-basic-info">
                                                                                                                                                                          <a href="#">
                                                                                                                                                                                        <p><?php echo ($v["goodsname"]); ?></p>
                                                                                                                                                                                        
                                                                                                                                                                          </a>
                                                                                                                                                             </div>
                                                                                                                                                </div>
                                                                                                                                    </li>
                                                                                                                                    <li class="td td-price">
                                                                                                                                                <div class="item-price">￥<?php echo ($v["goodsnow"]); ?></div>
                                                                                                                                    </li>
                                                                                                                                    <li class="td td-number">
                                                                                                                                                <div class="item-number">
                                                                                                                                                            <span>×</span><?php echo ($v["number"]); ?>
                                                                                                                                                </div>
                                                                                                                                    </li>
                                                                                                                                    <li class="td td-operation">
                                                                                                                                                <div class="item-operation">
                                                                                                                                                             <a href="refund.html">退款</a>
                                                                                                                                                 </div>
                                                                                                                                    </li>
                                                                                                                      </ul><?php endforeach; endif; else: echo "" ;endif; ?>


                                                                                                         </div>
                                                                                                         <div class="order-right">
                                                                                                                      <li class="td td-amount">
                                                                                                                                    <div class="item-amount">
                                                                                                                                        合计：￥<?php echo ($vo["payprices"]); ?>
                                                                                                                                        <p>含运费：<span>0.00</span></p>
                                                                                                                                    </div>
                                                                                                                       </li>
                                                                                                                      <div class="move-right">
                                                                                                                                    <li class="td td-status">
                                                                                                                                                <div class="item-status">
                                                                                                                                                             <p class="Mystatus">购物完成</p>
                                                                                                                                                             <p class="order-info">订单被删除</p>
                                                                                                                                                </div>
                                                                                                                                    </li>
                                                                                                                                    <li class="td td-change">
                                                                                                                                                <div class="am-btn am-btn-danger anniu" onclick="recovery('<?php echo ($vo["id"]); ?>');">恢复订单</div>
                                                                                                                                    </li>
                                                                                                                       </div>
                                                                                                         </div>
                                                                                            </div>
                                                                               </div>
                                                                               <?php else: endif; endforeach; endif; else: echo "" ;endif; ?>
                                                                  <!-- 分页链接 -->
                                                                 <div class="am-fr">
                                                                              
                                                                  </div>
                                                        
                                                    </div>

                                        </div>

                                </div>

                            </div>

                        </div>

                        <!--  -->
                 




                </div>

            </div>
        </div>
    </div>
    </div>

<script src="/Public/admin/assets/js/amazeui.min.js"></script>
<script src="/Public/admin/assets/js/amazeui.datatables.min.js"></script>
<script src="/Public/admin/assets/js/dataTables.responsive.min.js"></script>
<script src="/Public/admin/assets/js/app.js"></script>
<script >
             //ORDER.run();
                 function newsort(){
                                 window.location.href='<?php echo U('/Admin/Sort/newSort');?>';
                 }

                 function delsort(){
                                if(confirm("确定要删除此分类吗？")){
                                               return true;
                                 }else{
                                               return false;
                                }
                  }
                //进行发货操作
                 function shipment(orderid){
                                $.post("/API/Order/shipment",{"orderid":orderid},function(res){
                                            alert(res.data);
                                            window.location.href='<?php echo U('/Admin/Order/index');?>';
                                });
                 }
                //提醒评价
                 function comment(orderid){
                                 $.post("/API/Order/Promptcomment",{"orderid":orderid},function(res){
                                            alert(res.data);
                                            window.location.href='<?php echo U('/Admin/Order/index');?>';
                                });
                 }

                function recovery(orderid){
                                if (confirm("确定恢复此订单吗？")) {
                                                 $.post("/API/Order/Recoveryorder",{"orderid":orderid},function(res){
                                                                alert(res.data);
                                                                window.location.href='<?php echo U('/Admin/Order/index');?>';
                                                });
                                }
                }
</script>
</body>

</html>